<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
		#box1{
			width: 200px;
			height: 200px;
			background: red url() 0 0 no-repeat;
		}
		#box2{
			width: 200px;
			height: 200px;
			background: blue url() 0 0 no-repeat;
		}
	</style>
	<script>
		
		window.onload= function(){

			box1 = document.getElementById('box1');
			box2 = document.getElementById('box2');

			box1.onclick= function () {
				
				box1.innerHTML = box2.innerHTML
				box2.innerHTML = '';
			}

			box2.onclick= function () {
				
				box2.innerHTML = box1.innerHTML
				box1.innerHTML = '';
			}


			// box.innerHTML = "xuebingsi";//子元素

			// alert(box.innerText); 




		}
	</script>
</head>
<body>
	<div id="box1">
		学并思
	</div>
	<div id="box2">
	</div>
</body>
</html>